You are here: Statements and Functions > Cap()
Syntax samples
CAP (<location>)
GROUP CAP(Loc1)
Returns the total capacity of a location. CAP() can be used to prepare a batch of entities to fill a location.
Any logic and any expression evaluated after translation. For a list of expressions evaluated after translation, see the Appendix A.
Components
<location>
The name of the location to examine. If this component is the name of a multi-unit location, CAP() will return the capacity of the entire location. For example, if each unit of a five-unit location has a capacity of five, CAP() will return twenty-five. This component can also be the name of an individual unit in a multi-unit location.
Example
The individual ovens of a ceramics plant have different capacities, but otherwise they are exactly the same. While each oven could be modeled as an individual location, it would be easier to model this situation as a multi-unit location. This example uses CAP() in the processing logic of the parent location to accumulate enough Sinks to fill each oven. The LOCATION() function returns the value of the current location.
Process Table
Entity |
Location |
Operation (min) |
---|---|---|
Sink |
Oven |
ACCUM CAP(LOCATION()) |
Routing Table
Blk |
Output |
Destination |
Rule |
Move Logic |
---|---|---|---|---|
1 |
Sink |
Cool |
FIRST 1 |
MOVE FOR 5 |
FREECAP(), LOC(), and LOCATION().